import { http } from "@/utils/http";
import { type } from "os";
import { baseUrlApi } from "./utils";

type homeResult = {
  page: any;
  result: any
};



/** 查询下面模块具体信息 */
export const getxmoduleController = (type: number | string) => {
  return http.request<homeResult>("get", baseUrlApi(`/xmoduleController/select/${type}`));
};


/** 修改场景管理相关信息 */
export const setxmoduleController = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi(`/xmoduleController/update`), { data });
};












/** 查询我的企业信息 */
export const aboutUsgetSelmyorginfo = () => {
  return http.request<homeResult>("get", baseUrlApi(`/secbackend/myorg/selmyorginfo`));
};


/** 更新企业 */
export const aboutUsupdatemyorg = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi(`/secbackend/myorg/updatemyorg`), { data });
};





// 合作案例
/** 分页查询合作案例 */
export const cooperationCaseselcooperationcasebypage = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi(`/secbackend/cooperationcase/selcooperationcasebypage`), { data });
};

/** 新增合作案例 */
export const cooperationCaseinsertcooperationcase = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/secbackend/cooperationcase/insertcooperationcase"), { data });
};


/** 删除合作案例 */
export const cooperationCasedelcooperationcase = (userid?: string | number) => {
  return http.request<homeResult>("delete", baseUrlApi(`/secbackend/cooperationcase/delcooperationcase/${userid}`));
};

/** 修改合作案例 */
export const cooperationCaseupdatecooperationcase = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/secbackend/cooperationcase/updatecooperationcase"), { data });
};






// 荣誉管理

/** 新增荣誉管理 */
export const honorinserthonor = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/secbackend/honor/inserthonor"), { data });
};


/** 删除合作案例 */
export const honordelhonor = (userid?: string | number) => {
  return http.request<homeResult>("delete", baseUrlApi(`/secbackend/honor/delhonor/${userid}`));
};

/** 修改合作案例 */
export const honorupdatehonor = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/secbackend/honor/updatehonor"), { data });
};

/** 分页查询合作案例 */
export const honorselhonorbypage = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi(`/secbackend/honor/selhonorbypage`), { data });
};






